<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" src="../js/vue.js"></script>
</head>
<body>
     <script type="text/javascript">
        let person1 ={
            name: 'zhangsan',
            age: 23
        }

        let person2 = {
            name: 'lisi',
            age: 28
        }
        //在person2中增加一个属性去代理访问person1对象中的属性
        Object.defineProperty(person2,'x',{
            get(){
                return person1.name
            },
            set(value){
                person1.name = value
            }
        }
        )
     </script>
</body>
</html>